package com.cmzj21.springcloud.service;

import com.cmzj21.springcloud.entities.CommonResult;
import com.cmzj21.springcloud.entities.Payment;
import com.cmzj21.springcloud.service.impl.PaymentFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author cmzj21
 */
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
public interface PaymentService {
    /**
     * openfeign 方法
     * @param id id号
     * @return 返回该id号对应的流水信息
     */
    @GetMapping(value = "/paymentSQL/{id}")
    CommonResult<Payment> paymentSql(@PathVariable("id") Long id);
}
